//
//  YGRegisterTableViewCell.m
//  yuanshangyiliao
//
//  Created by icholab on 2021/3/16.
//

#import "YGRegisterTableViewCell.h"

@interface YGRegisterTableViewCell ()
@property (nonatomic, strong) UILabel  *titleLabel;



@end
@implementation YGRegisterTableViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.titleLabel];
        [self addSubview:self.contentSuperView];
        [self loadContraints];
    }
    return self;
}

- (void)loadContraints{
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.height.mas_equalTo(self.mas_height);
        make.width.mas_equalTo(100);
        
    }];
    [self.contentSuperView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.titleLabel.mas_right);
        make.height.mas_equalTo(self.titleLabel.mas_height);
        make.right.mas_equalTo(self.mas_right).offset(-15);
    }];
}

- (void)addContentView:(UIView *)view{
    [self.contentSuperView addSubview:view];
}

- (void)setTitle:(NSString *)title{
    self.titleLabel.text = title;
}

- (void)configureData:(YGRegisterConfigureModel *)infoModel{
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


- (UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.font = [UIFont systemFontOfSize:15];
        _titleLabel.textColor = UIColorFromRGB(0x333333);
    }
    return _titleLabel;
}

- (UIView *)contentSuperView{
    if (!_contentSuperView) {
        _contentSuperView = [[UIView alloc] init];
    }
    return _contentSuperView;
}
@end
